package com.ansion.commonchat.startup;

import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;


public class AppStartInitProvider extends ContentProvider {
    @Override
    public boolean onCreate() {
        Log.i("APP_START", "AppStartInitProvider onCreate");
        String processName;
//        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
//            processName = ResourceUtils.getApplication().getProcessName();
//        } else {
//            processName = AppStartTaskHelper.getProcessNameOld();
//        }
//
//        if (!ResourceUtils.getPackageName().equals(processName)) {
//            Log.i(LogTag.APP_START, "AppStartInitProvider not the app process,return");
//            return false;
//        }
//        Log.i(LogTag.APP_START, "AppStartInitProvider onCreate1");
        AppStartTaskExecutor.initEvn();
//        Log.i(LogTag.APP_START, "AppStartInitProvider onCreate end");
        return false;
    }

    @Nullable
    @Override
    public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) {
        return null;
    }

    @Nullable
    @Override
    public String getType(@NonNull Uri uri) {
        return null;
    }

    @Nullable
    @Override
    public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) {
        return null;
    }

    @Override
    public int delete(@NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) {
        return 0;
    }

    @Override
    public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) {
        return 0;
    }
}
